import React, { useState } from 'react';
import { View } from 'react-native';
import SearchBar from '../components/SearchBar';
import SongItem from '../components/SongItem';

const SearchPage = () => {
  const [results, setResults] = useState([]);

  const handleSearch = (query) => {
    // 执行搜索逻辑
    setResults([{ title: 'Test Song', artist: 'Test Artist' }]);
  };

  return (
    <View style={styles.container}>
      <SearchBar onSearch={handleSearch} />
      <View style={styles.results}>
        {results.map((song, index) => (
          <SongItem key={index} song={song} />
        ))}
      </View>
    </View>
  );
};

export default SearchPage;